home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
EDITORS
/
ZAP130
/
!Zap
/
3rdParty
/
Moore
/
UtilsHelp
next >
Wrap
Text File
|
1994-03-18
|
4KB
|
129 lines
This is the ReadMe file for ZapUtils 0.03
© Paul Moore (04-Jan-1994)
This is a module providing a number of extra commands for Zap. It requires Zap
1.00 or later.
The distribution conditions of ZapUtils are the same as those for Zap, with
one exception; you do not need my permission to copy ZapUtils if you have
Dominic Symes' permission to copy Zap. Thus, ZapUtils is freeware and those
wishing to distribute it on a cover disk need only contact Dom for
permission.
You should distribute ZapUtils in both source and executable form.
Installation
============
1. Check your version of Zap is >= 1.00 (in the Info box).
2. Copy the ZapUtils module into the !Zap directory.
3. Add the line
RMLoad <Zap$Dir>.ZapUtils
after the line
RMLoad <Zap$Dir>.ZapBasic
in the !Zap.!Run file, if it is not already present.
4. Restart your copy of Zap.
The Commands
============
Note: All the word commands use a different definition of a "word" than the
one used by Zap's standard SLEFT and SRIGHT commands. Because of this, I
have supplied new commands BW and FW to replace the Zap defaults. If you
use this module, you may wish to amend your default Keys file to use the
FW and BW commands instead of SRIGHT and SLEFT.
For this module, a "word" is defined as any continuous set of letters,
numbers, or underscore characters. This matches an identifier in many
programming languages (notably C) and is fairly intuitive (to me, at least!)
In a future release of this module, I intend to add commands to alter the
set of characters which make up a "word".
WINLEFT n, WINRIGHT n, WINUP n, WINDOWN n
-----------------------------------------
These commands move the current Zap window on screen, by the amount specified
(in OS units). The intention is that a keymap could be used to temporarily make
the cursor keys move the window round, eg
cA &001 KEYMAP 5
LEFT &5018C WINLEFT 40:KEYMAP 5
RIGHT &5018D WINRIGHT 40:KEYMAP 5
DOWN &5018E WINDOWN 40:KEYMAP 5
UP &5018F WINUP 40:KEYMAP 5
FW, BW
------
Move the cursor forward and backward one word.
DELWORDLEFT, DELWORDRIGHT
-------------------------
Delete one word, to the left or to the right.
FILTERSEL "str"
---------------
This command takes the selected area of the current file, and feeds it to the
standard input of the command "str". The selection is replaced by the standard
output.
C-style redirection is used (ie, command <standard_in >standard_out), so only
filter programs written in languages using the Shared C Library are likely to
work.
Error messages are ignored.
<Wimp$ScrapDir> is used for temporary files (called Zap-In and Zap-Out).
As an example, to sort the selected area, use FILTERSEL "sort", assuming you
have a suitable sort program available.
SEARCHWORD n
------------
Search for the word at the cursor. The exact effect depends on the parameter n.
n=0 Search to buffer
n=+1 Search forward from the current cursor position (ie, next match)
n=-1 Search backward from the current cursor position (ie, previous match)
n=+2 Search forward from the start of the buffer (ie, first occurrence)
n=-2 Search forward from the start of the buffer (ie, last occurrence)
All searches wrap at the end of the buffer, just like Zap's standard search routine
(because that's what we use!)
To Do
=====
Add commands to change the set of 'word characters'.
Filter selection to check return code.
Filter selection bug - "out of memory" message on error.
Ctrl-U n SEARCHWORD 2 to search for the nth occurrence.
Searchword may be confused by macros defined on letters.
Escape/Cancel handling when in window move mode (needs a new Zap service call).
Version History
===============
0.01
0.02
Unreleased development versions
0.03
First release version.
Word move, delete, search, window move, filter selection.